import Vue from 'vue';
import VueRouter from 'vue-router';
import Reg from './pages/Reg.vue';
import Login from './pages/Login.vue';
import Manage from './pages/Manage.vue';
import Student from './pages/student';
import Class from './pages/class';
import Teacher from './pages/teacher';
import Test from './pages/Test.vue';
import Test1 from './pages/Test1.vue';
import TestCount from './pages/TestCount.vue';
Vue.use(VueRouter);

const routes = [
    { path: '/count', component: TestCount },
    { path: '/test', component: Test },
    { path: '/test1', component: Test1 },
    { path: '/reg', component: Reg },
    { path: '/login', component: Login },
    { path: '/manage', component: Manage ,
        children:[
            { path: 'student', component: Student },
            { path: 'class', component: Class },
            { path: 'teacher', component: Teacher },
        ] }
]

const router = new VueRouter({
    mode: 'history',
    routes // (缩写) 相当于 routes: routes
})

export default router;